import zmq
from random import randrange

context = zmq.Context()
socket = context.socket(zmq.PUB)
socket.bind("tcp://*:5556")
while True:
    zimcode = randrange(100000, 100005)
    temperature = randrange(-80, 135)
    relhumidity = randrange(10, 60)
    string = "%i %i %i" % (zimcode, temperature, relhumidity)
    print(string)
    socket.send_string(string)
